<template name="adminFlex">
	<aside class="sidebar-light sidebar--medium" role="navigation">
		<header class="sidebar-flex__header">
			<h1 class="sidebar-flex__title">{{_ "Administration"}}</h1>
			<button class="sidebar-flex__close-button" data-action="close">
				{{> icon block="sidebar-flex__close-icon" icon="cross"}}
			</button>
		</header>
		<div class="rooms-list {{#if isEmbedded}}rooms-list--embedded{{/if}}" aria-label="{{_ "Administration"}}">
			<ul class="rooms-list__list">
				{{#each _sidebarItem in sidebarItems}}
					{{> sidebarItem _sidebarItem }}
				{{/each}}
			</ul>

			{{#if hasSettingPermission}}
				<h3 class="rooms-list__type">{{_ "Settings"}}</h3>
				<div class="rc-input sidebar-flex__search">
					<label class="rc-input__label">
						<div class="rc-input__wrapper">
							<div class="rc-input__icon">
								{{> icon block="rc-input__icon-sv" icon="magnifier"}}
							</div>
							<input type="text" class="rc-input__element rc-input__element--small" name="settings-search" placeholder="{{_ 'Search'}}">
						</div>
					</label>
				</div>
				<ul class="rooms-list__list">
					{{#each _group in groups}}
						{{> sidebarItem _group}}
					{{else}}
						<div class="rc-input sidebar-flex__search">
							<div class="rc-input__wrapper">
								<p>{{_ "Nothing_found"}}.</p>
							</div>
						</div>
					{{/each}}
				</ul>
			{{/if}}
		</div>
	</aside>
</template>
